<template>
  <div>
    <div class="banner">
    <el-carousel height="600px">
      <el-carousel-item v-for="(item,i) in banner" :key="i">
         <img :src="item.picUrl"/>
      </el-carousel-item>
    </el-carousel>
  </div>

    <div class="content">
      <div class="ad_product_menu">
        <img src="../assets/images/ad_product.jpg" />
      </div>
      <div class="ad_product_main">
        <ul>
          <li><img src="../assets/images/ad_a.jpg"></li>
          <li><img src="../assets/images/ad_a.jpg" /></li>
          <li><img src="../assets/images/ad_a.jpg" /></li>
        </ul>
      </div>
    </div>

    <div class="content">
      <div class="index_hot">
        <div class="index_hot_menu">
          商家推荐
        </div>
        <div class="index_hot_main">
          <ul>
            <li><img src="../assets/images/p1.jpg" /></li>
            <li><img src="../assets/images/p1.jpg" /></li>
            <li><img src="../assets/images/p1.jpg" /></li>
          </ul>
        </div>

      </div>
    </div>

    <div class="content">
      <div class="index_hot_menu">
        精品推荐
      </div>

      <div class="index_productlist">
        <div class="index_productlist_left">
          <img src="../assets/images/p2.jpg">
        </div>
        <div class="index_productlist_right">
          <ul>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
          </ul>
        </div>
      </div>

    </div>

    <div class="content">
      <div class="index_hot_menu">
        精品推荐
      </div>

      <div class="index_productlist">
        <div class="index_productlist_left">
          <img src="../assets/images/p2.jpg" />
        </div>
        <div class="index_productlist_right">
          <ul>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
          </ul>
        </div>
      </div>

    </div>

    <div class="content">
      <div class="index_hot_menu">
        精品推荐
      </div>

      <div class="index_productlist">
        <div class="index_productlist_left">
          <img src="../assets/images/p2.jpg" />
        </div>
        <div class="index_productlist_right">
          <ul>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
            <li><img src="../assets/images/p2.jpg" /></li>
          </ul>
        </div>
      </div>

    </div>

    <div class="content">
      <div class="ad_product_menu">
        <img src="../assets/images/ad_product.jpg">
      </div>
      <div class="ad_product_main">
        <ul>
          <li><img src="../assets/images/ad_a.jpg" /></li>
          <li><img src="../assets/images/ad_a.jpg" /></li>
          <li><img src="../assets/images/ad_a.jpg" /></li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
 export default{
    data(){
      return{
        banner:[]
      };
    },
    methods:{
      getBanner(){
        this.$axios.get("http://api.mm2018.com:8095/api/goods/home")
            .then(res=>{
              console.log(res.data.result)
              this.banner=res.data.result[0].contents;
            });
          }
        },


  created(){
    this.getBanner();
  }
  };
</script>

<style scoped>
  .content {
    width: 1920px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
  }

  ul {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
  }

  .banner {
    width: 100%;
    height: 600px;
  }

  .ad_product {
    width: 100%;
    overflow: hidden;

  }

  .ad_product_menu {
    width: 100%;
    height: 50px;
    margin-top: 50px;
    margin-bottom: 50px;
  }

  .ad_product_menu img {
    width: 100%;
  }

  .ad_product_main {
    width: 100%;
  }

  .ad_product_main ul {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .ad_product_main ul li img {
    display: block;
    width: 600px;
    height: 450px;
  }

  .index_hot {
    width: 100%;
  }

  .index_hot_menu {
    width: 100%;
    height: 40px;
    background: #348408;
    margin-top: 50px;
    line-height: 40px;
    color: #fff;
    text-indent: 20px;
  }

  .index_hot_menu span {
    padding-right: 25px;
  }

  .index_hot_main {
    width: 100%;
  }


  .index_hot_main ul {
    display: flex;
    flex-flow: wrap;
    justify-content: space-between;
    padding-top: 50px;
  }

  .index_hot_main ul li {
    width: 400;
    margin-bottom: 30px;
  }

  .index_hot_main ul li img {
    width: 600px;
    height: 450px;
  }

  .index_hot_main ul li p {
    text-align: center;
    line-height: 30px;
    margin: 0px;
    padding: 0px;
    padding-top: 20px;
  }

  .index_productlist {
    width: 100%;
    height: auto;
    padding-top: 50px;
    overflow: hidden;
  }

  .index_productlist_left {
    width: 600px;
    height: auto;
    float: left;
  }

  .index_productlist_left img {
    display: block;
    width: 700px;
    height: 600px;
  }

  .index_productlist_right {
    width: 1200px;
    float: right;
  }

  .index_productlist_right ul {
    display: flex;
    justify-content: space-around;
    flex-flow: wrap;
  }

  .index_productlist_right ul li {
    width: 450px;
    height: 298px;
    overflow: hidden;
    margin-bottom: 20px;
  }

  .index_productlist_right ul li img {
    width: 480px;
    height: 338px;
    display: block;
  }
</style>
